package com.kaibo.roomdemo.data.db.entity

import android.arch.persistence.room.ColumnInfo
import android.arch.persistence.room.Entity
import android.arch.persistence.room.Index
import android.arch.persistence.room.PrimaryKey
import com.kaibo.roomdemo.annotation.PoKo

/**
 * @author Administrator
 * @date 2018/2/7 0007 上午 9:26
 * GitHub：
 * email：
 * description：
 */

@PoKo
@Entity(tableName = "users",
        indices = [(Index("id"))]
)
data class UserEntity(

        @PrimaryKey(autoGenerate = true)
        @ColumnInfo(name = "id")
        var id: Long = 0,

        @ColumnInfo(name = "user_name")
        var name: String = "",

        @ColumnInfo(name = "user_age")
        var age: Int = 0)